Crate parking_lot [−] [src]
This library provides implementations of Mutex
, RwLock
, Condvar
and
Once
that are smaller, faster and more flexible than those in the Rust
standard library. It also provides a ReentrantMutex
type.
Structs
Condvar |
A Condition Variable |
Mutex |
A mutual exclusion primitive useful for protecting shared data |
MutexGuard |
An RAII implementation of a "scoped lock" of a mutex. When this structure is dropped (falls out of scope), the lock will be unlocked. |
Once |
A synchronization primitive which can be used to run a one-time initialization. Useful for one-time initialization for globals, FFI or related functionality. |
ReentrantMutex |
A mutex which can be recursively locked by a single thread. |
ReentrantMutexGuard |
An RAII implementation of a "scoped lock" of a reentrant mutex. When this structure is dropped (falls out of scope), the lock will be unlocked. |
RwLock |
A reader-writer lock |
RwLockReadGuard |
RAII structure used to release the shared read access of a lock when dropped. |
RwLockWriteGuard |
RAII structure used to release the exclusive write access of a lock when dropped. |
WaitTimeoutResult |
A type indicating whether a timed wait on a condition variable returned due to a time out or not. |
Enums
OnceState |
Current state of a |
Constants
ONCE_INIT |
Initialization value for static |
Type Definitions
MutexGuardRef |
Typedef of an owning reference that uses a |
ReentrantMutexGuardRef |
Typedef of an owning reference that uses a |
RwLockReadGuardRef |
Typedef of an owning reference that uses a |
RwLockWriteGuardRef |
Typedef of an owning reference that uses a |